import React, { Component } from 'react'
import Item from '../Item/Item'
import './index.css'
export default class List extends Component {
    render() {
        // 接收todos
        let {todos,deleteTodo,changeDone} = this.props;
        return (
            <ul className="todo-main">
               {todos.map(todo=> <Item key={todo.id} todo={todo} changeDone={changeDone} deleteTodo={deleteTodo}/>)}
            </ul>
        )
    }
}
